import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/LoginManager.vue'
import ElementUI from '../components/ElementUI.vue'
import Register from '../components/Register.vue'
import ChangePswd from '../components/ChangePswd.vue'
import Home from '../components/Home.vue'
import user from '../components/user/user.vue'
import manager from '../components/user/manager.vue'
import type from '../components/movieManage/type.vue'
//使用路由机制
Vue.use(VueRouter)
const routes = [
  {path: '/', redirect: '/login'},
  {path: '/login', component: Login},
  {path: '/register', component: Register},
  {path: '/changePswd', component: ChangePswd},
  {path: '/home', component: Home,children:[
    {path: '/user', component: user},
    {path: '/manager', component: manager},
    {path: '/type', component: type},
  ]},


]

//路由导航守卫!!!!!!!

const router = new VueRouter({
  routes
})

export default router
